package util.AST.Terminal;

import util.Visitor;
import checker.SemanticException;

/**
 * AST class
 * @version 2010-september-04
 * @discipline Compiladores
 * @author Gustavo H P Carvalho
 * @email gustavohpcarvalho@ecomp.poli.br
 */
public class NumberValue extends Terminal {

	private String tipo;
	
	public String getTipo() {
		return tipo;
	}

	public void setTipo(String tipo) {
		this.tipo = tipo;
	}

	public NumberValue(String spelling) {
		super(spelling);
	}
	
	@Override
	public String toString(int level) {
		return "NumberValue(" + this.getSpelling() + ")\n";
	}
	
	public String toStringDecorada(int level) {
		return "NumberValue(" + this.getSpelling() + ") ("+this.getTipo()+")\n";
	}

	@Override
	public Object visit(Visitor v, Object arg) throws SemanticException {
		return v.visitNumberValue(this, arg);
	}	

}
